/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Pack_1;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author sp116880
 */
@Stateless
public class NewSessionBean implements NewSessionBeanLocal {
    @EJB
    private LibroFacadeLocal libroFacade;

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

    @Override
    public void addLibro(String titolo) {
        
        Libro l = new Libro();
        l.setTitolo(titolo);
        libroFacade.create(l);
        
    }

    @Override
    public List<Libro> findAll() {
        return libroFacade.findAll();
    }

}
